<?php
/**
 * Created by PhpStorm.
 * User: xiaoshuang.li
 * Date: 2014/12/15
 * Time: 9:37
 */
?>
<!--    <link rel="stylesheet" type="text/css" media="screen" href="css/superfish-vertical.css" />-->
<?php wp_nav_menu(array(
    'menu_class'=>'container'
)); ?>
<script>
    $('.container').find('.current_page_item').closest('.sub-menu').show('slow');
    $(function(){
        $('.sf-vertical').superfish({
            pathClass:'current'
        });
        $('.menu-item-has-children').click(function(e){
            console.log(' menu-item-has-children ');
            var self = $(this);
            if(self.hasClass('menu-item-has-children')){
                console.log('.menu-item-has-children');
                $('.container').find('.sub-menu').hide('slow');
                $(this).find('.sub-menu').toggle('slow');
            }
            e.stopPropagation();
        });
    });
</script>
